package io.jft.doll.room.typeConverters

import android.arch.persistence.room.TypeConverter
import com.google.gson.Gson
import io.jft.doll.room.entity.common.UdpREntity

class RoomUdpConverters {
    @TypeConverter
    fun fromUdpToString(value: UdpREntity) = Gson().toJson(value)!!

    @TypeConverter
    fun stringToUdp(value: String) = Gson().fromJson(value, UdpREntity::class.java)!!
}